<layout name="../../../resource/master" />

<form action="" method="POST" role="form">
    <legend>货品列表</legend>

    <table class="table table-hover">
        <thead>
        <tr>
            <th>编号</th>
            <foreach name="data" key="k" item="v">
                <th>{$k}</th>
            </foreach>
            <th>货号</th>
            <th>货存</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="listData" item="vo">
        <tr>

            <td>{$vo['glid']}</td>
            <foreach name="vo['combine']" item="vvo">
            <td>{$vvo}</td>
            </foreach>
            <td>{$vo['number']}</td>
            <td>{$vo['invengory']}</td>
            <td>
                <div class="btn-group ">

                    <a href="javascript:;" onclick="del({$vo['glid']})" class="btn btn-danger btn-xs del">删除</a>
                </div>
            </td>
        </tr>
        </foreach>
        <tr>
            <td>
                <input type="text" class="form-control">
            </td>

            <foreach name="data" key="k" item="v">
                <td>
                    <select name="combine[]"  class="form-control">
                        <option value=""> -- Select One -- </option>
                        <foreach name="v" key="kk" item="vo">
                            <option value="{$vo['gaid']}">{$vo['gtvalue']}</option>
                        </foreach>
                    </select>
                </td>
            </foreach>
            <td>
                <input type="text" class="form-control" name="number" >
            </td>
            <td>
                <input type="text" class="form-control" name="invengory">
            </td>
            <td>
            </td>
        </tr>
        </tbody>

    </table>



    <button type="submit" class="btn btn-primary">Submit</button>
</form>

<script>
    function del(glid) {
//    alert(1);
        util.confirm('确定删除吗?',function(){
            location.href = "{:u('admin/GoodsList/del')}"+'?glid='+glid;
        })
    }
</script>